version: "0.29.0"

definitions:
  selector:
    type: RecordSelector
    extractor:
      type: DpathExtractor
      field_path: []
  requester:
    type: HttpRequester
    url_base: "https://example.com"
    http_method: "GET"
    authenticator:
      type: BearerAuthenticator
      api_token: "\{{ config['api_key'] }}"
  retriever:
    type: SimpleRetriever
    record_selector:
      $ref: "#/definitions/selector"
    paginator:
      type: NoPagination
    requester:
      $ref: "#/definitions/requester"
  base_stream:
    type: DeclarativeStream
    retriever:
      $ref: "#/definitions/retriever"
  customers_stream:
    $ref: "#/definitions/base_stream"
    name: "customers"
    primary_key: "id"
    $parameters:
      path: "/example"

streams:
  - "#/definitions/customers_stream"

check:
  type: CheckStream
  stream_names:
    - "customers"

spec:
  type: Spec
  documentation_url: https://docs.airbyte.com/integrations/sources/{{dashCase name}}
  connection_specification:
    title: {{capitalCase name}} Spec
    type: object
    required:
      - api_key
    additionalProperties: true
    properties:
      # 'TODO: This schema defines the configuration required for the source. This usually involves metadata such as database and/or authentication information.':
      api_key:
        type: string
        description: API Key
